package company.aqiyi;

import java.util.*;

/**
 * @author briarbear
 * @blog https://briarbear.github.io
 * @date 2018-09-15 11:27
 */
public class A2 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            int n = scanner.nextInt();
            int m = scanner.nextInt();
            int p = scanner.nextInt();

            int[] a = new int[n + 1];
            for (int i = 1; i < n+1; i++) {
                a[i] =scanner.nextInt();
            }

            for (int i = 0; i < m; i++) {
                char c = scanner.next().charAt(0);
                int v = scanner.nextInt();
                if (c == 'A') a[v]++;
                else a[v]--;
            }

            List<List<Integer>> b = new ArrayList<>();
            ArrayList<Integer> t = new ArrayList<>();
            int val = a[p];
            for (int i = 1; i < n+1; i++) {
                List<Integer> temp = new ArrayList<>();
                temp.add(a[i]);
                temp.add(i);
                b.add(temp);
            }

            b.sort(Comparator.comparing(o -> -o.get(0)));
//            Collections.sort(b,(o1, o2) -> - o1.get(0).compareTo(o2.get(0)));
            int res = 1;
            for (int i = 0; i < n; i++) {
                if (i == 0){
                    res = 1;
                    continue;
                }
                if (b.get(i).get(0) != b.get(i-1).get(0))
                    res = i;
                if (b.get(i).get(1) == p){
                    System.out.println(res);
                    return;
                }
            }

            System.out.println(res);
        }
    }
}
